<template>
	<div style="margin-bottom: 10px;">
		<div class="list-head">
			<div class="list-head-icon clearfix">
				<img src="@/assets/img/home_img22.png" alt="">
				<h3>精准扶贫</h3>
			</div>
			<span class="fp-more" @click="tohelppoor">查看更多 <van-icon name="arrow" color="#CDCDCD" size="14px" class="fp-icon"/></span>
		</div>
		<div class="content">
			<div class="main" v-for="(item, index) in helpData" :key="index" @click="toDetail(item.id)">
				<div class="main-img">
					<img :src="item.smallPic" alt="">
				</div>
				<p class="p-title">{{item.productName}}</p>
				<p class="p-price">{{item.salePrice}}<i>{{item.salePriceUnit}}</i> <em>{{item.saleType}}{{item.postage}}</em></p>
				<p class="p-text"><img src="@/assets/img/home_img10.png" alt=""> {{item.aidName}}</p>
			</div>
		</div>
	</div>
</template>

<script>
	import Storage from "@/utils/storage";
	export default {
		props: {
			helpData: Array
		},
		data(){
			return {
				
			}
		},
		methods: {
			toDetail(id){
				if(Storage.get('active')){
					Storage.del('active')
				}
				this.$router.push({
					path: '/helppoor/pot/detail/' + id
				})
			},
			tohelppoor(){
				this.$router.push({
					path: '/helppoor'
				})
			}
		}	
		
	}
</script>

<style lang="scss" scoped>
	.content{
		width: 100%;
		display: flex;
		justify-content: center;
		background-color: #fff;
		padding-bottom: 16px;
		.main:first-child {
			margin-right: 10px;
		}
		.main-img{
			width: 167px;
			margin-bottom: 10px;
			img{
				width: 100%;
			}
		}
		.p-title{
			color: #344047;
			margin-bottom: 10px;
		}
		.p-price {
			font-size: 16px;
			color: #F58523;
			font-weight: 500;
			i{
				margin-left: 4px;
				font-weight: 400;
				font-size: 12px;
				color: #969C9E;
			}
			em{
				color: #31BC8D;
				font-size: 12px;
				margin-left: 6px;
			}
		}
		.p-text{
			font-size: 12px;
			color: #999;
			img{
				position: relative;
				top: -1px;
				width: 11px;
				vertical-align: middle;
				margin-right: 4px;
			}
		}
		
	}
	.list-head{
		width: 100%;
		height: 48px;
		line-height: 48px;
		padding: 0 16px;
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.list-head-icon{
			display: flex;
			align-items: center;
			img{
				width: 24px;
				vertical-align: middle;
				margin-bottom: 4px;
			}
		}
		h3{
			font-size: 16px;
			color: #344047;
			font-weight: 500;
			margin-left: 10px;
			float: left;
		}
		.fp-more{
			color: #666666;
			font-size: 12px;
			float: right;
			position: relative;
			.fp-icon{
				position: relative;
				right: 0;
				top: 2px;
			}
		}
	}
</style>
